﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CashierSystem.UserManager;
using CashierSystem.CashierInManager;

namespace CashierSystem.CustomerManager
{
    public partial class GetRegInForm : Form
    {
        string customerId;
        User user;
        public GetRegInForm(String customerId, User user)
        {
            this.customerId = customerId;
            this.user = user;
            InitializeComponent();
        }

        private void GetRegInForm_Load(object sender, EventArgs e)
        {
            label3.Text = CashierInManager.CashierInManager.loadOneCustomerName(customerId);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string customerId1 = customerId;
            string price = tbPrice.Text;
            string cashier = user.getAccount();
            CustomerManagerAction.saveRegIn(price, customerId1, cashier);

            DialogResult response = MessageBox.Show("添加成功！");
        }
    }
}